<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
    <div class="layui-form timo-compile">
    <form th:action="@{/message/type/save}">
        <input type="hidden" name="id" th:if="${type}" th:value="${type.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">分类名称</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="title" placeholder="请输入分类名称" th:value="${type?.title}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">图标</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="typeimg" placeholder="请输入图标" th:value="${type?.typeimg}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="num" placeholder="请输入排序" th:value="${type?.num}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">父id</label>
            <div class="layui-input-inline">
                 <select name="pid">
                  <option th:selected="${type?.pid  eq building?.id || pid  eq building?.id}"  th:each="building: ${list}" th:value="${building?.id}" th:text="${building.title}"></option>
                </select>
               </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
</body>
</html>